      </div><!--/row-->

      <hr style="margin-top: 0px;"/>

      <footer>
        <p style="line-height: 50px;height: 50px;">Boogiewoogie &copy; Company 2012</p>
      </footer>

    </div>
</body>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>js/jquery/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>js/jquery/jquery.cookie.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>js/jquery/jquery.jalert.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>admin/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
function openKCFinder(field_name, url, type, win) {
    tinyMCE.activeEditor.windowManager.open({
        file: base_url+'/cdn/kcfinder/browse.php?opener=tinymce&type=' + type,
        title: 'KCFinder',
        width: 700,
        height: 500,
        resizable: "yes",
        inline: true,
        close_previous: "no",
        popup_css: false
    }, {
        window: win,
        input: field_name
    });
    return false;
}
	$().ready(function() {
	   
		$('textarea#post_desc,textarea#content').tinymce({
			// Location of TinyMCE script
            file_browser_callback: 'openKCFinder',
			script_url : base_url+'/cdn/admin/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

			// Theme options
			theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
			theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			content_css : "css/content.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",

	       
			// Replace values for the template plugin
			template_replace_values : {
				username : "admin",
				staffid : "1"
			}
		});
	});
</script>
<!-- /TinyMCE -->
        <script type="text/javascript">
            var base_url = '<?php echo base_url(); ?>';
            var site_url = '<?php echo site_url(); ?>';
            var page_id = '<?php echo $this->uri->segment(5) ?>';
        </script>
<script type="text/javascript" src="<?php echo $this->config->item('cdn_url'); ?>/js/global.js"></script>

        <?php if($this->session->flashdata('_type')=='error'):?>
        <script type="text/javascript">
        
           $(document).ready(function(){
                $("#login_box").effect("shake");
               

           })
        </script>
        <?php endif; ?>
        <script type="text/javascript">
        $(function () {
                $('.nav-tabs a:first').tab('show')
            })
           var i = 2;
            function add_image_field(pic)
            {
                if ( i > pic )
                {
                    $('#image_field').jAlert('Bạn chỉ được upload tối đa '+pic);
                    return;
                }    
                html = "<div><a onclick='remove_parent(this)' title='Close' class=\"close\">&times;</a> <label><strong>Hình "+i+"</strong></label><input type=\"file\"  class=\"input-file\" id=\"userfile"+i+"\" name=\"userfile"+i+"\" /></div>";
                $('#image_field').append(html);    
                i++;
            }
            function remove_parent(obj)
            {
                $(obj).parent().remove();
                i--
            }
            $('.dropdown-toggle').dropdown()
            $(document).ready(function(){
                $( "#enddate" ).datepicker();
                $( "#startdate" ).datepicker();
                $("#add_more").click(function(){
                    add_image_field(5); 
                });
                
                var sidebar_height = $("#left").height();
                var sidebar_width = $("#left").width();
                var tmp = sidebar_width;
                var content_height = $("#_content").height();
                var body_width = $(".container-fluid").width();
                if(sidebar_height>content_height-50)
                    $(".hzbar").height(sidebar_height+50);
                $(".span10").width(body_width-(sidebar_width+5));
                $(".hzbar").click(function(){
                    
                    $(".span10").width(body_width-(tmp+5));
                    $("#left").toggle('slow',function(){
                        i++;
                        if(i%2!=0)
                            sidebar_width = 0; 
                        else
                            sidebar_width = $("#left").width();   
                        $(".span10").width(body_width-(sidebar_width+5));
                    });
                    
                });
            });
        </script>
</html>